package hk.polyu.dds;


import android.os.Bundle;
import android.preference.*;
import android.preference.Preference.*;
import android.app.Activity;
import android.content.SharedPreferences;
import android.view.Menu;

public class SettingActivity extends PreferenceActivity {
	
	SwitchPreference 		mPhy;
	CheckBoxPreference		mCoop;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        this.addPreferencesFromResource(R.xml.setting_pref);
        
        mCoop = (CheckBoxPreference) this.findPreference("coop");
        mCoop.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
			
			@Override
			public boolean onPreferenceChange(Preference preference, Object newValue) {
				if( newValue.toString().equals("true") ) {
					//SettingActivity.this.mPhy.setEnabled(true);
				} else {
					//SettingActivity.this.mPhy.setEnabled(false);
				}
				return true;
			}
		});
        
        

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {

        return true;
    }
}
